<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>libspotify: Track subsystem</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">libspotify
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Track subsystem</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga8b69cf193679c7e00031ae43e61c6a54"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga8b69cf193679c7e00031ae43e61c6a54">sp_track_is_loaded</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga947c0f7755b0c4955ca0b0993db0f2b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__error.html#gafd27986ce4cd9eeaeca8adda83c9eb6b">sp_error</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga947c0f7755b0c4955ca0b0993db0f2b5">sp_track_error</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga281e0ad4373579c5d24202ea1f93fe7b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__session.html#gaeaa41aad3c0047409996a6ec3b03203f">sp_track_offline_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga281e0ad4373579c5d24202ea1f93fe7b">sp_track_offline_get_status</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga9c78846badae6567fe9f9a3792fd06c8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__session.html#ga60c7ff53ddbc04c036a23181b7275d69">sp_track_availability</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga9c78846badae6567fe9f9a3792fd06c8">sp_track_get_availability</a> (<a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *session, <a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:gabcb75da69e0338006bdbd2f2f467f082"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#gabcb75da69e0338006bdbd2f2f467f082">sp_track_is_local</a> (<a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *session, <a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga4eeb86de13187697cd9dfe0b0934988d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga4eeb86de13187697cd9dfe0b0934988d">sp_track_is_autolinked</a> (<a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *session, <a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga112dca47d0bac39818b55119ef134ffd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga112dca47d0bac39818b55119ef134ffd">sp_track_get_playable</a> (<a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *session, <a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga2367d906c578e674d0d470d8c1ee3b33"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga2367d906c578e674d0d470d8c1ee3b33">sp_track_is_placeholder</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:gab17d380ac941e102af0f308ad885b3c3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#gab17d380ac941e102af0f308ad885b3c3">sp_track_is_starred</a> (<a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *session, <a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:gabee64a739385f37f52320fb5af635ab6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#gabee64a739385f37f52320fb5af635ab6">sp_track_set_starred</a> (<a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *session, <a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *const *tracks, int num_tracks, bool star)</td></tr>
<tr class="memitem:ga0aa945fc43e35d36cc334a52735d83b2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga0aa945fc43e35d36cc334a52735d83b2">sp_track_num_artists</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga67cd0c035627a1e4a54642213fdf1d75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga31764fbd69618c10be173c6c03d4c1bc">sp_artist</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga67cd0c035627a1e4a54642213fdf1d75">sp_track_artist</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track, int index)</td></tr>
<tr class="memitem:ga39a0f52244472cb2d450ea9ba6807304"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga6fd3e5de729c429fef3ff18ece6dcfad">sp_album</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga39a0f52244472cb2d450ea9ba6807304">sp_track_album</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga8eb423d3cc2cbfb743c7f23ffb8d0fad"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga8eb423d3cc2cbfb743c7f23ffb8d0fad">sp_track_name</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:gac817937bd8d8355b6a1949b76d0b5560"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#gac817937bd8d8355b6a1949b76d0b5560">sp_track_duration</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga4570f08f968edbff519b44d2241d2255"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga4570f08f968edbff519b44d2241d2255">sp_track_popularity</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga9d464ee4a5c8836b59888952b960223a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga9d464ee4a5c8836b59888952b960223a">sp_track_disc</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga25c1df9d32fd58f243397740b29c3f61"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga25c1df9d32fd58f243397740b29c3f61">sp_track_index</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga0fb814ef23636fdecda64e3a63b15a23"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga0fb814ef23636fdecda64e3a63b15a23">sp_localtrack_create</a> (const char *artist, const char *title, const char *album, int length)</td></tr>
<tr class="memitem:ga809ed70d450f83a97b880c9b4e8d9f10"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga809ed70d450f83a97b880c9b4e8d9f10">sp_track_add_ref</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
<tr class="memitem:ga8b9a9ca88c7fb60e19420ce2261c7131"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__track.html#ga8b9a9ca88c7fb60e19420ce2261c7131">sp_track_release</a> (<a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *track)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga0fb814ef23636fdecda64e3a63b15a23"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a>* <a class="el" href="group__track.html#ga0fb814ef23636fdecda64e3a63b15a23">sp_localtrack_create</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>artist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>title</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>album</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the newly created local track</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">artist</td><td>Name of the artist </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">title</td><td>Song title </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">album</td><td>Name of the album, or an empty string if not available </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>Length in MS, or -1 if not available.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>A track. </dd></dl>

</div>
</div>
<a class="anchor" id="ga809ed70d450f83a97b880c9b4e8d9f10"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__track.html#ga809ed70d450f83a97b880c9b4e8d9f10">sp_track_add_ref</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Increase the reference count of a track</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track object </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a57">browse.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga39a0f52244472cb2d450ea9ba6807304"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga6fd3e5de729c429fef3ff18ece6dcfad">sp_album</a>* <a class="el" href="group__track.html#ga39a0f52244472cb2d450ea9ba6807304">sp_track_album</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The album of the specified track</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>A track object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The album of the given track. You need to increase the refcount if you want to keep the pointer around. If no metadata is available for the track yet, this function returns 0. </dd></dl>

</div>
</div>
<a class="anchor" id="ga67cd0c035627a1e4a54642213fdf1d75"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga31764fbd69618c10be173c6c03d4c1bc">sp_artist</a>* <a class="el" href="group__track.html#ga67cd0c035627a1e4a54642213fdf1d75">sp_track_artist</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The artist matching the specified index performing on the current track.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track whose participating artist you are interested in </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index for the participating artist. Should be in the interval [0, <a class="el" href="group__track.html#ga0aa945fc43e35d36cc334a52735d83b2">sp_track_num_artists()</a> - 1]</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The participating artist, or NULL if invalid index </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a8">browse.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga9d464ee4a5c8836b59888952b960223a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__track.html#ga9d464ee4a5c8836b59888952b960223a">sp_track_disc</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the disc number for a track</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>A track object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Disc index. Possible values are [1, total number of discs on album] This function returns valid data only for tracks appearing in a browse artist or browse album result (otherwise returns 0). </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a6">browse.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gac817937bd8d8355b6a1949b76d0b5560"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__track.html#gac817937bd8d8355b6a1949b76d0b5560">sp_track_duration</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The duration, in milliseconds, of the specified track</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>A track object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The duration of the specified track, in milliseconds If no metadata is available for the track yet, this function returns 0. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a1">browse.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga947c0f7755b0c4955ca0b0993db0f2b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__error.html#gafd27986ce4cd9eeaeca8adda83c9eb6b">sp_error</a> <a class="el" href="group__track.html#ga947c0f7755b0c4955ca0b0993db0f2b5">sp_track_error</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return an error code associated with a track. For example if it could not load</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>One of the following errors, from <a class="el" href="group__error.html#ga83154178d3a32668658734d2facfa22b">sp_error</a> SP_ERROR_OK SP_ERROR_IS_LOADING SP_ERROR_OTHER_PERMANENT </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a34">browse.c</a>, and <a class="el" href="jukebox_8c-example.html#a3">jukebox.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga9c78846badae6567fe9f9a3792fd06c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__session.html#ga60c7ff53ddbc04c036a23181b7275d69">sp_track_availability</a> <a class="el" href="group__track.html#ga9c78846badae6567fe9f9a3792fd06c8">sp_track_get_availability</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return availability for a track</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>Session </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Availability status, see <a class="el" href="group__session.html#ga60c7ff53ddbc04c036a23181b7275d69">sp_track_availability</a></dd></dl>
<dl class="section note"><dt>Note:</dt><dd>The track must be loaded or this function will always SP_TRACK_AVAILABILITY_UNAVAILABLE </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__track.html#ga8b69cf193679c7e00031ae43e61c6a54">sp_track_is_loaded()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga112dca47d0bac39818b55119ef134ffd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a>* <a class="el" href="group__track.html#ga112dca47d0bac39818b55119ef134ffd">sp_track_get_playable</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return the actual track that will be played if the given track is played</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>Session </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>A track </dd></dl>

</div>
</div>
<a class="anchor" id="ga25c1df9d32fd58f243397740b29c3f61"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__track.html#ga25c1df9d32fd58f243397740b29c3f61">sp_track_index</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the position of a track on its disc</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>A track object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Track position, starts at 1 (relative the corresponding disc) This function returns valid data only for tracks appearing in a browse artist or browse album result (otherwise returns 0). </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a7">browse.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga4eeb86de13187697cd9dfe0b0934988d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="group__track.html#ga4eeb86de13187697cd9dfe0b0934988d">sp_track_is_autolinked</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return true if the track is autolinked to another track.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>Session </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if track is autolinked.</dd></dl>
<dl class="section note"><dt>Note:</dt><dd>The track must be loaded or this function will always return false. </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__track.html#ga8b69cf193679c7e00031ae43e61c6a54">sp_track_is_loaded()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga8b69cf193679c7e00031ae43e61c6a54"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="group__track.html#ga8b69cf193679c7e00031ae43e61c6a54">sp_track_is_loaded</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return whether or not the track metadata is loaded.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if track is loaded</dd></dl>
<dl class="section note"><dt>Note:</dt><dd>This is equivalent to checking if <a class="el" href="group__track.html#ga947c0f7755b0c4955ca0b0993db0f2b5">sp_track_error()</a> not returns SP_ERROR_IS_LOADING. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a40">browse.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gabcb75da69e0338006bdbd2f2f467f082"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="group__track.html#gabcb75da69e0338006bdbd2f2f467f082">sp_track_is_local</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return true if the track is a local file.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>Session </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if track is a local file.</dd></dl>
<dl class="section note"><dt>Note:</dt><dd>The track must be loaded or this function will always return false. </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__track.html#ga8b69cf193679c7e00031ae43e61c6a54">sp_track_is_loaded()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga2367d906c578e674d0d470d8c1ee3b33"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="group__track.html#ga2367d906c578e674d0d470d8c1ee3b33">sp_track_is_placeholder</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return true if the track is a placeholder. Placeholder tracks are used to store other objects than tracks in the playlist. Currently this is used in the inbox to store artists, albums and playlists.</p>
<p>Use <a class="el" href="group__link.html#ga82c29419ce70e2b504670e3d45167d5d">sp_link_create_from_track()</a> to get a link object that points to the real object this "track" points to.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if track is a placeholder</dd></dl>
<dl class="section note"><dt>Note:</dt><dd>Contrary to most functions the track does not have to be loaded for this function to return correct value </dd></dl>

</div>
</div>
<a class="anchor" id="gab17d380ac941e102af0f308ad885b3c3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="group__track.html#gab17d380ac941e102af0f308ad885b3c3">sp_track_is_starred</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return true if the track is starred by the currently logged in user.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>Session </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>True if track is starred.</dd></dl>
<dl class="section note"><dt>Note:</dt><dd>The track must be loaded or this function will always return false. </dd></dl>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="group__track.html#ga8b69cf193679c7e00031ae43e61c6a54">sp_track_is_loaded()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a2">browse.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga8eb423d3cc2cbfb743c7f23ffb8d0fad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="group__track.html#ga8eb423d3cc2cbfb743c7f23ffb8d0fad">sp_track_name</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The string representation of the specified track's name</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>A track object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The string representation of the specified track's name. Returned string is valid as long as the album object stays allocated and no longer than the next call to <a class="el" href="group__session.html#ga019a640b351de2a1ffe040ed755013f4">sp_session_process_events()</a> If no metadata is available for the track yet, this function returns empty string. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a3">browse.c</a>, and <a class="el" href="jukebox_8c-example.html#a5">jukebox.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga0aa945fc43e35d36cc334a52735d83b2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__track.html#ga0aa945fc43e35d36cc334a52735d83b2">sp_track_num_artists</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The number of artists performing on the specified track</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track whose number of participating artists you are interested in</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of artists performing on the specified track. If no metadata is available for the track yet, this function returns 0. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a4">browse.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga281e0ad4373579c5d24202ea1f93fe7b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__session.html#gaeaa41aad3c0047409996a6ec3b03203f">sp_track_offline_status</a> <a class="el" href="group__track.html#ga281e0ad4373579c5d24202ea1f93fe7b">sp_track_offline_get_status</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return offline status for a track. <a class="el" href="structsp__session__callbacks.html#a09912988f00ea5e90835681b382a18fc">sp_session_callbacks::metadata_updated()</a> will be invoked when offline status of a track changes</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Stats as described by <a class="el" href="group__session.html#gae689044941537050de641a1dcd4c75d5">sp_track_offline_status</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga4570f08f968edbff519b44d2241d2255"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="group__track.html#ga4570f08f968edbff519b44d2241d2255">sp_track_popularity</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns popularity for track</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>A track object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Popularity in range 0 to 100, 0 if undefined. If no metadata is available for the track yet, this function returns 0. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a5">browse.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga8b9a9ca88c7fb60e19420ce2261c7131"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__track.html#ga8b9a9ca88c7fb60e19420ce2261c7131">sp_track_release</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *&#160;</td>
          <td class="paramname"><em>track</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Decrease the reference count of a track</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">track</td><td>The track object </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="browse_8c-example.html#a36">browse.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gabee64a739385f37f52320fb5af635ab6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__track.html#gabee64a739385f37f52320fb5af635ab6">sp_track_set_starred</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga70dd19c6f824cf6a159575aa4c128b53">sp_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga47bbd2262f0c8b5d7147af7d62198e48">sp_track</a> *const *&#160;</td>
          <td class="paramname"><em>tracks</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num_tracks</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>star</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Star/Unstar the specified track</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>Session </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">tracks</td><td>Array of pointer to tracks. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_tracks</td><td>Length of <code>tracks</code> array </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">star</td><td>Starred status of the track</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note:</dt><dd>This will fail silently if playlists are disabled. </dd></dl>
<dl class="section see"><dt>See also:</dt><dd>sp_set_playlists_enabled() </dd></dl>

</div>
</div>
</div><!-- contents -->
<hr size="1"><address style="text-align: right;"><small>
Generated on Wed Mar 28 2012 18:22:23.<br>
Copyright &copy; 2006&ndash;2012 Spotify Ltd</small></address>
</body>
</html>
